<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>farsi - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />

<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>

<body>

<header>

<div class="header">
  <a href="http://vim-jp.org/">vim-jp</a>
  / <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
  / farsi<br />
  <a name="top"></a><h1>farsi - Vim Documentation</h1>
  <a href="index.html">Return to main</a>

  <span class="EnglishJapaneseLink">
    <span class="CurrentLanguage">English</span>
  </span>
</div>
</header>

<nav>
<dl>

<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>

<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>

<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>

<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>

<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>

<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>

<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>

<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>

<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>

<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>

<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>

<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>

<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>

<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>

<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>

<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>

<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>

</dl>
</nav>

<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="farsi.html" name="farsi.txt">farsi.txt</a>&nbsp;&nbsp;&nbsp;&nbsp; For&nbsp;<span class="Identifier">Vim version 8.0.</span>&nbsp;&nbsp;Last change: 2015 Aug 29<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Identifier">VIM REFERENCE MANUAL&nbsp;&nbsp;&nbsp;&nbsp;by Mortaza Ghassab Shiran</span><br>
<br>
<br>
Right to Left and Farsi Mapping for Vim&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="farsi.html#farsi" name="farsi">farsi</a>&nbsp;<a class="Constant" href="farsi.html#Farsi" name="Farsi">Farsi</a><br>
<br>
<span class="Special">{Vi does not have any of these commands}</span><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="farsi.html#E27" name="E27">E27</a><br>
In order to use right-to-left and Farsi mapping support, it is necessary to<br>
compile Vim with the&nbsp;<a class="Identifier" href="various.html#+farsi">+farsi</a>&nbsp;feature.<br>
<br>
These functions have been made by Mortaza G. Shiran &lt;shiran@jps.net&gt;<br>
<br>
<br>
Introduction<br>
<span class="PreProc">------------</span><br>
In right-to-left oriented files the characters appear on the screen from right<br>
to left.&nbsp;&nbsp;This kind of file is most useful when writing Farsi documents,<br>
composing faxes or writing Farsi memos.<br>
<br>
The commands, prompts and help files are not in Farsi, therefore the user<br>
interface remains the standard Vi interface.<br>
<br>
<br>
Highlights<br>
<span class="PreProc">----------</span><br>
o&nbsp;&nbsp;Editing left-to-right files as in the original Vim, no change.<br>
<br>
o&nbsp;&nbsp;Viewing and editing files in right-to-left windows.&nbsp;&nbsp; File orientation is<br>
&nbsp;&nbsp; per window, so it is possible to view the same file in right-to-left and<br>
&nbsp;&nbsp; left-to-right modes, simultaneously.<br>
<br>
o&nbsp;&nbsp;Compatibility to the original Vim.&nbsp;&nbsp; Almost all features work in<br>
&nbsp;&nbsp; right-to-left mode (see bugs below).<br>
<br>
o&nbsp;&nbsp;Changing keyboard mapping and reverse insert modes using a single<br>
&nbsp;&nbsp; command.<br>
<br>
o&nbsp;&nbsp;Backing from reverse insert mode to the correct place in the file<br>
&nbsp;&nbsp; (if possible).<br>
<br>
o&nbsp;&nbsp;While in Farsi mode, numbers are entered from left to right.&nbsp;&nbsp;Upon entering<br>
&nbsp;&nbsp; a none number character, that character will be inserted just into the<br>
&nbsp;&nbsp; left of the last number.<br>
<br>
o&nbsp;&nbsp;No special terminal with right-to-left capabilities is required.&nbsp;&nbsp;The<br>
&nbsp;&nbsp; right-to-left changes are completely hardware independent.&nbsp;&nbsp;Only<br>
&nbsp;&nbsp; Farsi font is necessary.<br>
<br>
o&nbsp;&nbsp;Farsi keymapping on the command line in reverse insert mode.<br>
<br>
o&nbsp;&nbsp;Toggling between left-to-right and right-to-left via F8 function key.<br>
<br>
o&nbsp;&nbsp;Toggling between Farsi ISIR-3342 standard encoding and Vim Farsi via F9<br>
&nbsp;&nbsp; function key.&nbsp;&nbsp;Since this makes sense only for the text written in<br>
&nbsp;&nbsp; right-to-left mode, this function is also supported only in right-to-left<br>
&nbsp;&nbsp; mode.<br>
<br>
Farsi Fonts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="farsi.html#farsi-fonts" name="farsi-fonts">farsi-fonts</a><br>
<span class="PreProc">-----------</span><br>
<br>
The following files are found in the subdirectories of the '$VIM/farsi/fonts'<br>
directory:<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;far-a01.pcf&nbsp;&nbsp;&nbsp;&nbsp;X Windows fonts for Unix including Linux systems<br>
&nbsp;&nbsp; +&nbsp;&nbsp;far-a01.bf&nbsp;&nbsp;&nbsp;&nbsp; X Windows fonts for SunOS<br>
&nbsp;&nbsp; +&nbsp;&nbsp;far-a01.f16&nbsp;&nbsp;&nbsp;&nbsp;a screen fonts for Unix including Linux systems<br>
&nbsp;&nbsp; +&nbsp;&nbsp;far-a01.fon&nbsp;&nbsp;&nbsp;&nbsp;a monospaced fonts for Windows NT/95/98<br>
&nbsp;&nbsp; +&nbsp;&nbsp;far-a01.com&nbsp;&nbsp;&nbsp;&nbsp;a screen fonts for DOS<br>
<br>
<br>
Font Installation<br>
<span class="PreProc">-----------------</span><br>
<br>
o&nbsp;&nbsp;Installation of fonts for MS Window systems (NT/95/98)<br>
<br>
&nbsp;&nbsp; From 'Control Panel' folder, start the 'Fonts' program.&nbsp;&nbsp;Then from&nbsp;<span class="MissingTag">'file'</span><br>
&nbsp;&nbsp; menu item select 'Install New Fonts ...'.&nbsp;&nbsp;Browse and select the<br>
&nbsp;&nbsp; 'far-a01.fon', then follow the installation guide.<br>
&nbsp;&nbsp;&nbsp;<span class="Todo">NOTE</span>: several people have reported that this does not work.&nbsp;&nbsp;The solution<br>
&nbsp;&nbsp; is unknown.<br>
<br>
o&nbsp;&nbsp;Installation of fonts for X Window systems (Unix/Linux)<br>
<br>
&nbsp;&nbsp; Depending on your system, copy far-a01.pcf.Z or far-a01.pcf.gz into a<br>
&nbsp;&nbsp; directory of your choice.&nbsp;&nbsp;Change to the directory containing the Farsi<br>
&nbsp;&nbsp; fonts and execute the following commands:<br>
<br>
&nbsp;&nbsp; &gt;&nbsp;&nbsp;mkfontdir<br>
&nbsp;&nbsp; &gt;&nbsp;&nbsp;xset +fp path_name_of_farsi_fonts_directory<br>
<br>
o&nbsp;&nbsp;Installation of fonts for X Window systems (SunOS)<br>
<br>
&nbsp;&nbsp; Copy far-a01.bf font into a directory of your choice.<br>
&nbsp;&nbsp; Change to the directory containing the far-a01.fb fonts and<br>
&nbsp;&nbsp; execute the following commands:<br>
<br>
&nbsp;&nbsp; &gt;&nbsp;&nbsp;fldfamily<br>
&nbsp;&nbsp; &gt;&nbsp;&nbsp;xset +fp path_name_of_fonts_directory<br>
<br>
o&nbsp;&nbsp;Installation of ASCII screen fonts (Unix/Linux)<br>
<br>
&nbsp;&nbsp; For Linux system, copy the far-a01.f16 fonts into /usr/lib/kbd/consolefonts<br>
&nbsp;&nbsp; directory and execute the setfont program as &quot;setfont far-a01.f16&quot;.&nbsp;&nbsp;For<br>
&nbsp;&nbsp; other systems (e.g. SCO Unix), please refer to the fonts installation<br>
&nbsp;&nbsp; section of your system administration manuals.<br>
<br>
o&nbsp;&nbsp;Installation of ASCII screen fonts (DOS)<br>
<br>
&nbsp;&nbsp; After system power on, prior to the first use of Vim, upload the Farsi<br>
&nbsp;&nbsp; fonts by executing the far-a01.com font uploading program.<br>
<br>
<br>
Usage<br>
<span class="PreProc">-----</span><br>
Prior to starting Vim, the environment in which Vim can run in Farsi mode,<br>
must be set.&nbsp;&nbsp;In addition to installation of Farsi fonts, following points<br>
refer to some of the system environments, which you may need to set:<br>
Key code mapping, loading graphic card in ASCII screen mode, setting the IO<br>
driver in 8 bit clean mode ... .<br>
<br>
o&nbsp;&nbsp;Setting the Farsi fonts<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;For Vim GUI set the&nbsp;<a class="Type" href="options.html#'guifont'">'guifont'</a>&nbsp;to far-a01.&nbsp;&nbsp;This is done by entering<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;':set guifont=far-a01' in the Vim window.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You can have&nbsp;<a class="Type" href="options.html#'guifont'">'guifont'</a>&nbsp;set to far-a01 by Vim during the Vim startup<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by appending the ':set guifont=far-a01' into your .vimrc file<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(in case of NT/95/98 platforms _vimrc).<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Under the X Window environment, you can also start Vim with the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'-fn far-a01' option.<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;For Vim within a xterm, start a xterm with the Farsi fonts (e.g.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kterm -fn far-a01).&nbsp;&nbsp;Then start Vim inside the kterm.<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;For Vim under DOS, prior to the first usage of Vim, upload the Farsi<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fonts by executing the far-a01.com fonts uploading program.<br>
<br>
o&nbsp;&nbsp;Farsi Keymapping Activation<br>
<br>
&nbsp;&nbsp; To activate the Farsi keymapping, set either&nbsp;<a class="Type" href="options.html#'altkeymap'">'altkeymap'</a>&nbsp;or&nbsp;<a class="Type" href="options.html#'fkmap'">'fkmap'</a>.<br>
&nbsp;&nbsp; This is done by entering ':set akm' or ':set fk' in the Vim window.<br>
&nbsp;&nbsp; You can have&nbsp;<a class="Type" href="options.html#'altkeymap'">'altkeymap'</a>&nbsp;or&nbsp;<a class="Type" href="options.html#'fkmap'">'fkmap'</a>&nbsp;set as default by appending ':set akm'<br>
&nbsp;&nbsp; or ':set fk' in your .vimrc file or _vimrc in case of NT/95/98 platforms.<br>
<br>
&nbsp;&nbsp; To turn off the Farsi keymapping as a default second language keymapping,<br>
&nbsp;&nbsp; reset the&nbsp;<a class="Type" href="options.html#'altkeymap'">'altkeymap'</a>&nbsp;by entering ':set noakm'.<br>
<br>
o&nbsp;&nbsp;right-to-left Farsi Mode<br>
<br>
&nbsp;&nbsp; By default Vim starts in Left-to-right mode.&nbsp;&nbsp;Following are ways to change<br>
&nbsp;&nbsp; the window orientation:<br>
<br>
&nbsp;&nbsp; + Start Vim with the -F option (e.g. vim -F ...).<br>
<br>
&nbsp;&nbsp; + Use the F8 function key to toggle between left-to-right and right-to-left.<br>
<br>
&nbsp;&nbsp; + While in Left-to-right mode, enter 'set rl' in the command line (<a class="Type" href="options.html#'rl'">'rl'</a>&nbsp;is<br>
&nbsp;&nbsp;&nbsp;&nbsp; the abbreviation for rightleft).<br>
<br>
&nbsp;&nbsp; + Put the 'set rl' line in your '.vimrc' file to start Vim in<br>
&nbsp;&nbsp;&nbsp;&nbsp; right-to-left mode permanently.<br>
<br>
Encoding<br>
<span class="PreProc">--------</span><br>
<br>
The letter encoding used is the Vim extended ISIR-3342 standard with a built<br>
in function to convert between Vim extended ISIR-3342 and ISIR-3342 standard.<br>
<br>
For document portability reasons, the letter encoding is kept the same across<br>
different platforms (i.e. UNIX's, NT/95/98, MS DOS, ...).<br>
<br>
<br>
o&nbsp;&nbsp;Keyboard<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;<span class="Special">CTRL-_</span>&nbsp;in insert/replace modes toggles between Farsi(akm)/Latin<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mode as follows:<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;<span class="Special">CTRL-_</span>&nbsp;moves the cursor to the end of the typed text in edit mode.<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;<span class="Special">CTRL-_</span>&nbsp;in command mode only toggles keyboard mapping between Farsi(akm)/<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latin.&nbsp;&nbsp;The Farsi text is then entered in reverse insert mode.<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;F8 - Toggles between left-to-right and right-to-left.<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;F9 - Toggles the encoding between ISIR-3342 standard and Vim extended<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ISIR-3342 (supported only in right-to-left mode).<br>
<br>
&nbsp;&nbsp; +&nbsp;&nbsp;Keyboard mapping is based on the Iranian ISIRI-2901 standard.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Following table shows the keyboard mapping while Farsi(akm) mode set:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`&nbsp;&nbsp;1&nbsp;&nbsp;2&nbsp;&nbsp;3&nbsp;&nbsp;4&nbsp;&nbsp;5&nbsp;&nbsp;6&nbsp;&nbsp;7&nbsp;&nbsp;8&nbsp;&nbsp;9&nbsp;&nbsp;0&nbsp;&nbsp;-&nbsp;&nbsp;=<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;~&nbsp;&nbsp;!&nbsp;&nbsp;@&nbsp;&nbsp;#&nbsp;&nbsp;$&nbsp;&nbsp;%&nbsp;&nbsp;^&nbsp;&nbsp;&amp;&nbsp;&nbsp;*&nbsp;&nbsp;(&nbsp;&nbsp;)&nbsp;&nbsp;_&nbsp;&nbsp;+<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;~&nbsp;&nbsp;?&nbsp;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lt;&nbsp;&nbsp;y&nbsp;&nbsp;x&nbsp;&nbsp;c&nbsp;&nbsp;v&nbsp;&nbsp;b&nbsp;&nbsp;n&nbsp;&nbsp;m&nbsp;&nbsp;,&nbsp;&nbsp;.&nbsp;&nbsp;/<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;Y&nbsp;&nbsp;X&nbsp;&nbsp;C&nbsp;&nbsp;V&nbsp;&nbsp;B&nbsp;&nbsp;<span class="Special">N</span>&nbsp;&nbsp;M&nbsp;&nbsp;&lt;&nbsp;&nbsp;&gt;&nbsp;&nbsp;?<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?&nbsp;&nbsp;?<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-------------------------------------<br>
<br>
<span class="Todo">Note</span>:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&nbsp;&nbsp;stands for Farsi PSP (break without space)<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&nbsp;&nbsp;stands for Farsi PCN (for HAMZE attribute)<br>
<br>
Restrictions<br>
<span class="PreProc">------------</span><br>
<br>
o&nbsp;&nbsp;In insert/replace mode and fkmap (Farsi mode) set,&nbsp;<span class="Special">CTRL-B</span>&nbsp;is not<br>
&nbsp;&nbsp; supported.<br>
<br>
o&nbsp;&nbsp;If you change the character mapping between Latin/Farsi, the redo buffer<br>
&nbsp;&nbsp; will be reset (emptied).&nbsp;&nbsp;That is, redo is valid and will function (using<br>
&nbsp;&nbsp; '.') only within the mode you are in.<br>
<br>
o&nbsp;&nbsp;While numbers are entered in Farsi mode, the redo buffer will be reset<br>
&nbsp;&nbsp; (emptied).&nbsp;&nbsp;That is, you cannot redo the last changes (using '.') after<br>
&nbsp;&nbsp; entering numbers.<br>
<br>
o&nbsp;&nbsp;While in left-to-right mode and Farsi mode set,&nbsp;<span class="Special">CTRL-R</span>&nbsp;is not supported.<br>
<br>
o&nbsp;&nbsp;While in right-to-left mode, the search on 'Latin' pattern does not work,<br>
&nbsp;&nbsp; except if you enter the Latin search pattern in reverse.<br>
<br>
o&nbsp;&nbsp;In command mode there is no support for entering numbers from left<br>
&nbsp;&nbsp; to right and also for the sake of flexibility the keymapping logic is<br>
&nbsp;&nbsp; restricted.<br>
<br>
o&nbsp;&nbsp;Under the X Window environment, if you want to run Vim within a xterm<br>
&nbsp;&nbsp; terminal emulator and Farsi mode set, you need to have an ANSI compatible<br>
&nbsp;&nbsp; xterm terminal emulator.&nbsp;&nbsp;This is because the letter codes above 128 decimal<br>
&nbsp;&nbsp; have certain meanings in the standard xterm terminal emulator.<br>
<br>
&nbsp;&nbsp;&nbsp;<span class="Todo">Note</span>: Under X Window environment, Vim GUI works fine in Farsi mode.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This eliminates the need of any xterm terminal emulator.<br>
<br>
<br>
Bugs<br>
----<br>
While in insert/replace and Farsi mode set, if you repeatedly change the<br>
cursor position (via cursor movement) and enter new text and then try to undo<br>
the last change, the undo will lag one change behind.&nbsp;&nbsp;But as you continue to<br>
undo, you will reach the original line of text.&nbsp;&nbsp;You can also use U to undo all<br>
changes made in the current line.<br>
<br>
For more information about the bugs refer to rileft.txt.<br>
<br>
&nbsp;vim:tw=78:ts=8:ft=help:norl:<br>
</div>

</article>

<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
  <span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>

<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->

</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
